<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //slice从索引开始找到m处(不含m)，m不写截取到末尾
        //slice支持负数作为索引
        //超过索引也截取到末尾
        let str = "shidazhishidazhi"
        console.log(str.slice(3, 7));
    </script>
</body>

</html>